# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=detect-secrets
pkgver=v1.5.0.r49.g50119d6
pkgrel=1
pkgdesc='An enterprise friendly way of detecting and preventing secrets in code.'
arch=('any')
groups=('blackarch' 'blackarch-code-audit')
url='https://github.com/Yelp/detect-secrets'
license=('Apache')
depends=('python' 'python-requests' 'python-yaml' 'python-ahocorasick'
         'gibberish-detector')
makedepends=('git' 'python-setuptools')
source=("git+https://github.com/Yelp/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd $pkgname

  python setup.py build
}

package() {
  cd $pkgname

  python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}

